/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.nii.qlks.GUI;

import edu.nii.qlks.ControlLayer.PhongControl;
import edu.nii.qlks.DataTransferObject.PhongInfo;
import java.util.Vector;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;
import javax.swing.table.DefaultTableModel;

/**
 *
 * @author MARS_NHO
 */
public class LapDanhMucPhong extends javax.swing.JFrame {

    PhongControl phongCT;
    PhongInfo phongInfo;
    private static Vector tableRecords = new Vector();
    private static Vector tableTitle = new Vector();
    
    /**
     * Creates new form LapDanhMucPhong
     */
    public LapDanhMucPhong() throws Exception {
        initComponents();
        
        phongCT = new PhongControl();
        phongInfo = new PhongInfo();
        
        tableTitle.add("MaPhong");
        tableTitle.add("TenPhong");
        tableTitle.add("MaLoaiPhong");
        tableTitle.add("TinhTrang");
        tableTitle.add("GhiChu");
        jTable_DSPhong.setModel(new DefaultTableModel(tableRecords, tableTitle));
        
        
        LoadDanhSachPhong();
    }
    
    public void LoadDanhSachPhong() throws Exception{
 
        tableRecords = phongCT.LayDS();
        jTable_DSPhong.setModel(new DefaultTableModel(tableRecords, tableTitle));
    }
    
    public void Load_DS_Phong(Vector vt){
        tableRecords = vt;
        jTable_DSPhong.setModel(new DefaultTableModel(tableRecords, tableTitle));
    }
    
    
    
    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jXPanel1 = new org.jdesktop.swingx.JXPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTable_DSPhong = new org.jdesktop.swingx.JXTable();
        jXButton_LoadDS = new org.jdesktop.swingx.JXButton();
        jXButton_DS2 = new org.jdesktop.swingx.JXButton();
        jXPanel3 = new org.jdesktop.swingx.JXPanel();
        jXLabel1 = new org.jdesktop.swingx.JXLabel();
        jXLabel2 = new org.jdesktop.swingx.JXLabel();
        jXLabel3 = new org.jdesktop.swingx.JXLabel();
        jXLabel4 = new org.jdesktop.swingx.JXLabel();
        jXLabel5 = new org.jdesktop.swingx.JXLabel();
        jXLabel6 = new org.jdesktop.swingx.JXLabel();
        jXTextField_MaPhong = new org.jdesktop.swingx.JXTextField();
        jXTextField_MaLoaiPhong = new org.jdesktop.swingx.JXTextField();
        jXTextField_TinhTrang = new org.jdesktop.swingx.JXTextField();
        jXTextField_TenPhong = new org.jdesktop.swingx.JXTextField();
        jXTextField5 = new org.jdesktop.swingx.JXTextField();
        jXTextField_GhiChu = new org.jdesktop.swingx.JXTextField();
        jXLabel7 = new org.jdesktop.swingx.JXLabel();
        jXButton_Lap = new org.jdesktop.swingx.JXButton();
        jXTextField1 = new org.jdesktop.swingx.JXTextField();
        jXTextField2 = new org.jdesktop.swingx.JXTextField();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jXPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Danh sach phong"));

        jTable_DSPhong.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "MaPhong", "TenPhong", "MaLoaiPhong", "TinhTrang", "GhiChu"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.Object.class
            };
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane1.setViewportView(jTable_DSPhong);
        jTable_DSPhong.getColumnModel().getColumn(0).setResizable(false);
        jTable_DSPhong.getColumnModel().getColumn(1).setResizable(false);
        jTable_DSPhong.getColumnModel().getColumn(2).setResizable(false);
        jTable_DSPhong.getColumnModel().getColumn(3).setResizable(false);
        jTable_DSPhong.getColumnModel().getColumn(4).setResizable(false);

        javax.swing.GroupLayout jXPanel1Layout = new javax.swing.GroupLayout(jXPanel1);
        jXPanel1.setLayout(jXPanel1Layout);
        jXPanel1Layout.setHorizontalGroup(
            jXPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jXPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 470, Short.MAX_VALUE)
                .addContainerGap())
        );
        jXPanel1Layout.setVerticalGroup(
            jXPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 217, Short.MAX_VALUE)
        );

        jXButton_LoadDS.setText("LoadDS");
        jXButton_LoadDS.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jXButton_LoadDSActionPerformed(evt);
            }
        });

        jXButton_DS2.setText("LoadDS2");
        jXButton_DS2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jXButton_DS2ActionPerformed(evt);
            }
        });

        jXPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder("Thong tin phong"));

        jXLabel1.setText("Ma Phong");

        jXLabel2.setText("Ma Loai Phong");

        jXLabel3.setText("Tinh Trang Phong");

        jXLabel4.setText("Ten Phong");

        jXLabel5.setText("Don Gia Phong");

        jXLabel6.setText("Ghi Chu");

        jXTextField_TinhTrang.setEditable(false);

        jXTextField5.setEditable(false);

        javax.swing.GroupLayout jXPanel3Layout = new javax.swing.GroupLayout(jXPanel3);
        jXPanel3.setLayout(jXPanel3Layout);
        jXPanel3Layout.setHorizontalGroup(
            jXPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jXPanel3Layout.createSequentialGroup()
                .addGap(23, 23, 23)
                .addGroup(jXPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jXLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jXLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jXLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(20, 20, 20)
                .addGroup(jXPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jXTextField_MaPhong, javax.swing.GroupLayout.DEFAULT_SIZE, 112, Short.MAX_VALUE)
                    .addComponent(jXTextField_MaLoaiPhong, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jXTextField_TinhTrang, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jXPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jXLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jXLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jXLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jXPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(jXTextField_GhiChu, javax.swing.GroupLayout.DEFAULT_SIZE, 111, Short.MAX_VALUE)
                    .addComponent(jXTextField5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jXTextField_TenPhong, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        jXPanel3Layout.setVerticalGroup(
            jXPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jXPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jXPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jXLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jXLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jXTextField_MaPhong, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jXTextField_TenPhong, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(31, 31, 31)
                .addGroup(jXPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jXLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jXLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jXTextField_MaLoaiPhong, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jXTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 44, Short.MAX_VALUE)
                .addGroup(jXPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jXLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jXLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jXTextField_TinhTrang, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jXTextField_GhiChu, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(26, 26, 26))
        );

        jXLabel7.setText("LAP DANH MUC PHONG");
        jXLabel7.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N

        jXButton_Lap.setText("Them");
        jXButton_Lap.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jXButton_LapActionPerformed(evt);
            }
        });

        jXTextField1.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                jXTextField1KeyReleased(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(23, 23, 23)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jXButton_LoadDS, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jXButton_Lap, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(30, 30, 30)
                        .addComponent(jXButton_DS2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(17, 17, 17))
                    .addComponent(jXPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jXPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(46, 46, 46)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jXTextField1, javax.swing.GroupLayout.DEFAULT_SIZE, 125, Short.MAX_VALUE)
                    .addComponent(jXTextField2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(66, 66, 66))
            .addGroup(layout.createSequentialGroup()
                .addGap(222, 222, 222)
                .addComponent(jXLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addComponent(jXLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jXPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jXButton_LoadDS, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jXButton_DS2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jXButton_Lap, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jXTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 14, Short.MAX_VALUE)
                        .addComponent(jXPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(32, 32, 32)
                        .addComponent(jXTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(0, 0, Short.MAX_VALUE))))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jXButton_LoadDSActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jXButton_LoadDSActionPerformed
        try {
            // TODO add your handling code here:
            LoadDanhSachPhong();
        } catch (Exception ex) {
            Logger.getLogger(LapDanhMucPhong.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_jXButton_LoadDSActionPerformed

    private void jXButton_DS2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jXButton_DS2ActionPerformed
        // TODO add your handling code here:
 
        
    }//GEN-LAST:event_jXButton_DS2ActionPerformed

    private void jXButton_LapActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jXButton_LapActionPerformed

        phongInfo.setTenPhong(jXTextField_TenPhong.getText());
        phongInfo.setMaLoaiPhong(jXTextField_MaLoaiPhong.getText());
//        boolean isTT = false;
//        if (jXTextField_TinhTrang.getText().equals("true")){
//            isTT = true;
//        }
//        else
//            isTT = false;
        //MAC DINH TINH TRANG PHONG = FASLE
        phongInfo.setTinhTrangPhong(false);
        phongInfo.setGhiChu(jXTextField_GhiChu.getText());
        

        //TAO MA TU DONG CHO MA PHONG
        String str = "";
        Vector vt_ds = new Vector();

//        if (tableRecords.size() > 0){
//            //phongInfo.setMaPhong(phongCT.TaoMaTuDong(tableRecords.get(tableRecords.size() - 1).toString(), 2));
//            Vector vt_row = new Vector();
//            vt_row = (Vector)tableRecords.get(tableRecords.size() - 1);
//            str = vt_row.get(0).toString();
//            jXTextField1.setText(phongCT.TaoMaTuDong(str, 2));
//            System.out.println("co du lieu: " + str + ": " + phongCT.TaoMaTuDong(str, 2));
//            //phongInfo.setMaPhong(phongCT.TaoMaTuDong(str, 2));
//        }
//        else{
//            //phongInfo.setMaPhong(phongCT.TaoMaTuDong("MP000", 2));
//            jXTextField1.setText(phongCT.TaoMaTuDong("MP000", 2));
//            System.out.println("khoong co du lieu");
//        }
        //jXTextField1.setText(phongCT.TaoMaTuDong("MP000", 2));

        try {
            vt_ds = phongCT.LayDS();
            if (vt_ds.size() > 0){
                Vector vt_row = new Vector();
                vt_row = (Vector) vt_ds.get(vt_ds.size() - 1);
                str = vt_row.get(0).toString().trim(); //ma phong              
                String matd = phongCT.TaoMaTuDong(str, 2);
                phongInfo.setMaPhong(matd);
            }
        } catch (Exception ex) {
            Logger.getLogger(LapDanhMucPhong.class.getName()).log(Level.SEVERE, null, ex);
        }
 
        //THEM PHONG VAO CSDL
        try {
            phongCT.Insert(phongInfo);
            Load_DS_Phong(phongCT.LayDS());
            JOptionPane.showMessageDialog(rootPane, "Them thanh cong");
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(rootPane, "Them khong thanh cong");
            Logger.getLogger(LapDanhMucPhong.class.getName()).log(Level.SEVERE, null, ex);
        }
       
    }//GEN-LAST:event_jXButton_LapActionPerformed

    private void jXTextField1KeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jXTextField1KeyReleased
        // TODO add your handling code here:
        if (evt.getKeyCode() == evt.VK_ENTER){
            jXTextField2.setText(phongCT.TaoMaTuDong(jXTextField1.getText(), 2));
        }
    }//GEN-LAST:event_jXTextField1KeyReleased

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(LapDanhMucPhong.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(LapDanhMucPhong.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(LapDanhMucPhong.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(LapDanhMucPhong.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                try {
                    new LapDanhMucPhong().setVisible(true);
                } catch (Exception ex) {
                    Logger.getLogger(LapDanhMucPhong.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JScrollPane jScrollPane1;
    private org.jdesktop.swingx.JXTable jTable_DSPhong;
    private org.jdesktop.swingx.JXButton jXButton_DS2;
    private org.jdesktop.swingx.JXButton jXButton_Lap;
    private org.jdesktop.swingx.JXButton jXButton_LoadDS;
    private org.jdesktop.swingx.JXLabel jXLabel1;
    private org.jdesktop.swingx.JXLabel jXLabel2;
    private org.jdesktop.swingx.JXLabel jXLabel3;
    private org.jdesktop.swingx.JXLabel jXLabel4;
    private org.jdesktop.swingx.JXLabel jXLabel5;
    private org.jdesktop.swingx.JXLabel jXLabel6;
    private org.jdesktop.swingx.JXLabel jXLabel7;
    private org.jdesktop.swingx.JXPanel jXPanel1;
    private org.jdesktop.swingx.JXPanel jXPanel3;
    private org.jdesktop.swingx.JXTextField jXTextField1;
    private org.jdesktop.swingx.JXTextField jXTextField2;
    private org.jdesktop.swingx.JXTextField jXTextField5;
    private org.jdesktop.swingx.JXTextField jXTextField_GhiChu;
    private org.jdesktop.swingx.JXTextField jXTextField_MaLoaiPhong;
    private org.jdesktop.swingx.JXTextField jXTextField_MaPhong;
    private org.jdesktop.swingx.JXTextField jXTextField_TenPhong;
    private org.jdesktop.swingx.JXTextField jXTextField_TinhTrang;
    // End of variables declaration//GEN-END:variables
}
